package org.lhg.activiti.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.lhg.activiti.mapper.FormTableMapper;
import org.lhg.activiti.model.FormTable;
import org.lhg.activiti.service.FormTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class FormTableServiceImpl extends ServiceImpl<FormTableMapper, FormTable> implements FormTableService {
    @Autowired
    private FormTableMapper formTableMapper;
    @Override
    public List<FormTable> listFormTable(Map<String, Object> map) {
        return formTableMapper.listFormTable(map);
    }

    @Override
    public Long getTotal(Map<String, Object> map) {
        return formTableMapper.getTotal(map);
    }

    @Override
    public int addFormTable(FormTable formTable) {
        return formTableMapper.addFormTable(formTable);
    }

    @Override
    public FormTable findById(String id) {
        return formTableMapper.findById(Integer.valueOf(id));
    }

    @Override
    public int updateFormTable(FormTable formTable) {
        return formTableMapper.updateFormTable(formTable);
    }

    @Override
    public int deleteByFormId(String id) {
        return formTableMapper.deleteByFormId(Integer.valueOf(id));
    }

    @Override
    public FormTable formTable_by_processInstanceKey(String processInstanceKey) {
        return formTableMapper.formTable_by_processInstanceKey(processInstanceKey);
    }
}
